backport some fixes related to documentation building
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 27 Feb 2020 13:52:19 +0000 (13:52 +0000)
committerDmitry Shachnev <mitya57@debian.org>
Thu, 27 Feb 2020 13:52:19 +0000 (13:52 +0000)
Origin: upstream, this is a backport of four commits:
 - https://code.qt.io/cgit/qt/qtbase.git/commit/?id=0014d81b1907621e
   doc: Revert to documenting the actual functions
 - https://code.qt.io/cgit/qt/qtbase.git/commit/?id=81d8319276f26d39
   doc: Fix all clang parse errors in QtBase during PCH build
 - https://code.qt.io/cgit/qt/qtbase.git/commit/?id=c306663990ba8681
   Fix qdoc errors in QProcess header
 - https://code.qt.io/cgit/qt/qtbase.git/commit/?id=98cb9275d064d8b9
   doc: clang reported two fake declarations to be the same
Last-Update: 2019-06-15

These changes help us to eliminate most of the warnings like this:
(qdoc) warning: No documentation for 'QRect::bottom() const'

There were 3603 such warnings without this patch, with it only 76
are left.

Gbp-Pq: Name docs_fixes.diff

39 files changed:
src/corelib/global/qfloat16.h
src/corelib/io/qprocess.h
src/corelib/kernel/qmetatype.h
src/corelib/kernel/qtimer.cpp
src/corelib/kernel/qtimer.h
src/corelib/kernel/qvariant.h
src/corelib/plugin/qfactoryinterface.h
src/corelib/serialization/qcborvalue.cpp
src/corelib/serialization/qcborvalue.h
src/corelib/serialization/qjsonvalue.h
src/corelib/thread/qresultstore.cpp
src/corelib/thread/qresultstore.h
src/corelib/tools/qbytearraylist.h
src/dbus/qdbusargument.cpp
src/dbus/qdbusargument.h
src/dbus/qdbusconnection.h
src/dbus/qdbuspendingcall.cpp
src/dbus/qdbuspendingcall.h
src/dbus/qdbuspendingreply.cpp
src/dbus/qdbuspendingreply.h
src/dbus/qdbusreply.cpp
src/dbus/qdbusreply.h
src/dbus/qdbusutil.cpp
src/gui/accessible/qaccessible.h
src/gui/opengl/qopenglfunctions.h
src/gui/opengl/qopenglshaderprogram.h
src/gui/text/qabstracttextdocumentlayout.h
src/network/kernel/qhostinfo.cpp
src/network/kernel/qhostinfo.h
src/opengl/qgl.h
src/opengl/qglshaderprogram.h
src/widgets/dialogs/qmessagebox.h
src/widgets/graphicsview/qgraphicsitem.h
src/widgets/graphicsview/qgraphicslayout.h
src/widgets/graphicsview/qgraphicslayoutitem.h
src/widgets/widgets/qmenu.cpp
src/widgets/widgets/qmenu.h
src/widgets/widgets/qtoolbar.cpp
src/widgets/widgets/qtoolbar.h

index b76d2b961690e6ae62f2e1cc35209ac0ba140bcc..fc006db3f2d6f1220a38173f04fb2421b208344d 100644 (file)
@@ -67,11 +67,9 @@ QT_BEGIN_NAMESPACE
 class qfloat16
 {
 public:
-#ifndef Q_QDOC
     Q_DECL_CONSTEXPR inline qfloat16() Q_DECL_NOTHROW : b16(0) { }
     inline qfloat16(float f) Q_DECL_NOTHROW;
     inline operator float() const Q_DECL_NOTHROW;
-#endif
 
 private:
     quint16 b16;
index 474fc87de8409df5acb0e03e307e85e4e118cf56..803ae6ed01a4a00ef10cdf39f3200eac3ed76e9c 100644 (file)
 
 QT_REQUIRE_CONFIG(processenvironment);
 
-QT_BEGIN_NAMESPACE
-
-class QProcessPrivate;
-
-#if !defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
-typedef qint64 Q_PID;
-#else
-QT_END_NAMESPACE
+#ifdef Q_OS_WIN
 typedef struct _PROCESS_INFORMATION *Q_PID;
+#endif
+
+#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
 typedef struct _SECURITY_ATTRIBUTES Q_SECURITY_ATTRIBUTES;
 typedef struct _STARTUPINFOW Q_STARTUPINFO;
-QT_BEGIN_NAMESPACE
 #endif
 
+QT_BEGIN_NAMESPACE
+
+class QProcessPrivate;
 class QProcessEnvironmentPrivate;
 
+#ifndef Q_OS_WIN
+typedef qint64 Q_PID;
+#endif
+
 class Q_CORE_EXPORT QProcessEnvironment
 {
 public:
index ed7feee775f0d2d052a071506121a17e6c89b541..e12d7a1a630d6a40f86ac71bc13f7a618eb1685d 100644 (file)
@@ -1976,7 +1976,9 @@ QT_FOR_EACH_STATIC_WIDGETS_CLASS(QT_FORWARD_DECLARE_STATIC_TYPES_ITER)
 typedef QList<QVariant> QVariantList;
 typedef QMap<QString, QVariant> QVariantMap;
 typedef QHash<QString, QVariant> QVariantHash;
-#ifndef Q_CLANG_QDOC
+#ifdef Q_CLANG_QDOC
+class QByteArrayList;
+#else
 typedef QList<QByteArray> QByteArrayList;
 #endif
 
index 13f027074a8edb434ac24584dab0fe4a83bfb497..9d3bd5fdbfc92c9c930efdf014e61aab01ac10b8 100644 (file)
@@ -599,7 +599,7 @@ void QTimer::singleShot(int msec, Qt::TimerType timerType, const QObject *receiv
 */
 
 /*!
-    \fn template <typename PointerToMemberFunction> QMetaObject::Connection QTimer::callOnTimeout(const QObject *receiver, PointerToMemberFunction slot, Qt::ConnectionType connectionType = Qt::AutoConnection)
+    \fn template <typename MemberFunction> QMetaObject::Connection QTimer::callOnTimeout(const QObject *receiver, MemberFunction *slot, Qt::ConnectionType connectionType = Qt::AutoConnection)
     \since 5.12
     \overload callOnTimeout()
 
index 66f317c5670b24a89a7335d05be220b0bd29f0c3..336b814b272d8a01a0cc56e46e6110614de4588e 100644 (file)
@@ -100,8 +100,8 @@ public:
     QMetaObject::Connection callOnTimeout(Functor slot, Qt::ConnectionType connectionType = Qt::AutoConnection);
     template <typename Functor>
     QMetaObject::Connection callOnTimeout(const QObject *context, Functor slot, Qt::ConnectionType connectionType = Qt::AutoConnection);
-    template <typename PointerToMemberFunction>
-    QMetaObject::Connection callOnTimeout(const QObject *receiver, PointerToMemberFunction slot, Qt::ConnectionType connectionType = Qt::AutoConnection);
+    template <typename MemberFunction>
+    QMetaObject::Connection callOnTimeout(const QObject *receiver, MemberFunction *slot, Qt::ConnectionType connectionType = Qt::AutoConnection);
 #else
     // singleShot to a QObject slot
     template <typename Duration, typename Func1>
index ff73c27b6eeba84b3fb3d14ac8c813df9c3fff27..f95502e75f15dc28259a2e7dcc1d254eb90dfe66 100644 (file)
@@ -55,6 +55,8 @@
 
 #if QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L
 #include <variant>
+#elif defined(Q_CLANG_QDOC)
+namespace std { template<typename...> struct variant; }
 #endif
 
 QT_BEGIN_NAMESPACE
@@ -365,7 +367,7 @@ class Q_CORE_EXPORT QVariant
     static inline QVariant fromValue(const T &value)
     { return qVariantFromValue(value); }
 
-#if defined(Q_CLANG_QDOC) || (QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L)
+#if QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L
     template<typename... Types>
     static inline QVariant fromStdVariant(const std::variant<Types...> &value)
     {
index f30646069053e818940e2918456279783b962790..3aec4ddd552058f8d9dea5652cab3c7fa3dc9994 100644 (file)
@@ -52,8 +52,9 @@ struct Q_CORE_EXPORT QFactoryInterface
     virtual QStringList keys() const = 0;
 };
 
-
+#ifndef Q_CLANG_QDOC
 Q_DECLARE_INTERFACE(QFactoryInterface, "org.qt-project.Qt.QFactoryInterface")
+#endif
 
 QT_END_NAMESPACE
 
index 80ef515fd28ac37b3e94fcf3bdc7a45346158b0a..bd74c89696e0353de2e9132301d5371dfb1ce178 100644 (file)
@@ -1986,12 +1986,24 @@ QUuid QCborValue::toUuid(const QUuid &defaultValue) const
     return QUuid::fromRfc4122(byteData->asByteArrayView());
 }
 
-QCborArray QCborValue::toArray() const
-{
-    return toArray(QCborArray());
-}
+/*!
+    \fn QCborArray QCborValue::toArray() const
+    \fn QCborArray QCborValue::toArray(const QCborArray &defaultValue) const
+
+    Returns the array value stored in this QCborValue, if it is of the array
+    type. Otherwise, it returns \a defaultValue.
+
+    Note that this function performs no conversion from other types to
+    QCborArray.
+
+    \sa isArray(), isByteArray(), isMap(), isContainer(), toMap()
+ */
 
 /*!
+    \fn QCborArray QCborValueRef::toArray() const
+    \fn QCborArray QCborValueRef::toArray(const QCborArray &defaultValue) const
+    \internal
+
     Returns the array value stored in this QCborValue, if it is of the array
     type. Otherwise, it returns \a defaultValue.
 
@@ -2000,6 +2012,11 @@ QCborArray QCborValue::toArray() const
 
     \sa isArray(), isByteArray(), isMap(), isContainer(), toMap()
  */
+QCborArray QCborValue::toArray() const
+{
+    return toArray(QCborArray());
+}
+
 QCborArray QCborValue::toArray(const QCborArray &defaultValue) const
 {
     if (!isArray())
@@ -2011,12 +2028,24 @@ QCborArray QCborValue::toArray(const QCborArray &defaultValue) const
     return dd ? QCborArray(*dd) : defaultValue;
 }
 
-QCborMap QCborValue::toMap() const
-{
-    return toMap(QCborMap());
-}
+/*!
+    \fn QCborMap QCborValue::toMap() const
+    \fn QCborMap QCborValue::toMap(const QCborMap &defaultValue) const
+
+    Returns the map value stored in this QCborValue, if it is of the map type.
+    Otherwise, it returns \a defaultValue.
+
+    Note that this function performs no conversion from other types to
+    QCborMap.
+
+    \sa isMap(), isArray(), isContainer(), toArray()
+ */
 
 /*!
+    \fn QCborMap QCborValueRef::toMap() const
+    \fn QCborMap QCborValueRef::toMap(const QCborMap &defaultValue) const
+    \internal
+
     Returns the map value stored in this QCborValue, if it is of the map type.
     Otherwise, it returns \a defaultValue.
 
@@ -2025,6 +2054,11 @@ QCborMap QCborValue::toMap() const
 
     \sa isMap(), isArray(), isContainer(), toArray()
  */
+QCborMap QCborValue::toMap() const
+{
+    return toMap(QCborMap());
+}
+
 QCborMap QCborValue::toMap(const QCborMap &defaultValue) const
 {
     if (!isMap())
index d6ba4e88d80a6ebbf27ec87c0f728a88b2ff2254..3d487ec69b115d76366d557b0d35c7e03f6dcf48 100644 (file)
@@ -242,16 +242,11 @@ public:
 #endif
     QUuid toUuid(const QUuid &defaultValue = {}) const;
 
-#ifdef Q_QDOC
-    QCborArray toArray(const QCborArray &a = {}) const;
-    QCborMap toMap(const QCborMap &m = {}) const;
-#else
     // only forward-declared, need split functions
     QCborArray toArray() const;
     QCborArray toArray(const QCborArray &defaultValue) const;
     QCborMap toMap() const;
     QCborMap toMap(const QCborMap &defaultValue) const;
-#endif
 
     const QCborValue operator[](const QString &key) const;
     const QCborValue operator[](QLatin1String key) const;
@@ -393,16 +388,11 @@ public:
     QUuid toUuid(const QUuid &defaultValue = {}) const
     { return concrete().toUuid(defaultValue); }
 
-#ifdef Q_QDOC
-    QCborArray toArray(const QCborArray &a = {}) const;
-    QCborMap toMap(const QCborMap &m = {}) const;
-#else
     // only forward-declared, need split functions. Implemented in qcbor{array,map}.h
     QCborArray toArray() const;
     QCborArray toArray(const QCborArray &a) const;
     QCborMap toMap() const;
     QCborMap toMap(const QCborMap &m) const;
-#endif
 
     int compare(const QCborValue &other) const
     { return concrete().compare(other); }
index 4df689078e54d13ed3f981e9ee2429a1a6fbdfde..b339786e1518c5fa28d6ea7b0884a414a4136d3e 100644 (file)
@@ -218,7 +218,6 @@ private:
     uint index : 31;
 };
 
-#ifndef Q_QDOC
 // ### Qt 6: Get rid of these fake pointer classes
 class QJsonValuePtr
 {
@@ -243,7 +242,6 @@ public:
     QJsonValueRef& operator*() { return valueRef; }
     QJsonValueRef* operator->() { return &valueRef; }
 };
-#endif
 
 Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonValue)
 
index e0ce1b4b789edeb10ae70f24b52f7335dd10a740..1b3bc20eca027f16649ebe565bdee81ba1142a41 100644 (file)
@@ -43,6 +43,21 @@ QT_BEGIN_NAMESPACE
 
 namespace QtPrivate {
 
+/*!
+  \class QtPrivate::ResultItem
+  \internal
+ */
+
+/*!
+  \class QtPrivate::ResultIteratorBase
+  \internal
+ */
+
+/*!
+  \class QtPrivate::ResultStoreBase
+  \internal
+ */
+
 ResultIteratorBase::ResultIteratorBase()
  : mapIterator(QMap<int, ResultItem>::const_iterator()), m_vectorIndex(0) { }
 ResultIteratorBase::ResultIteratorBase(QMap<int, ResultItem>::const_iterator _mapIterator, int _vectorIndex)
index 39f0a6d1bb13c52dbcde53a6f09902bc5714459c..1f29e8d18715273954b68c0b1ff58f67b08a2900 100644 (file)
@@ -56,7 +56,6 @@ QT_BEGIN_NAMESPACE
     either individually or in batches.
 */
 
-#ifndef Q_QDOC
 
 namespace QtPrivate {
 
@@ -196,7 +195,6 @@ public:
 
 Q_DECLARE_TYPEINFO(QtPrivate::ResultItem, Q_PRIMITIVE_TYPE);
 
-#endif //Q_QDOC
 
 QT_END_NAMESPACE
 
index ed014dd1579a8bed753ce68c64339799513193e4..be94bc1d4034384bd2b3e31d598803b4870bc8be 100644 (file)
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
 
 typedef QListIterator<QByteArray> QByteArrayListIterator;
 typedef QMutableListIterator<QByteArray> QMutableByteArrayListIterator;
-#ifndef Q_QDOC
+#ifndef Q_CLANG_QDOC
 typedef QList<QByteArray> QByteArrayList;
 
 namespace QtPrivate {
@@ -58,13 +58,13 @@ namespace QtPrivate {
 }
 #endif
 
-#ifdef Q_QDOC
+#ifdef Q_CLANG_QDOC
 class QByteArrayList : public QList<QByteArray>
 #else
 template <> struct QListSpecialMethods<QByteArray>
 #endif
 {
-#ifndef Q_QDOC
+#ifndef Q_CLANG_QDOC
 protected:
     ~QListSpecialMethods() {}
 #endif
index a33c4f836332759a427d2608a7d739aa67439e1b..2d1373006d325370d1c147c411039aa9660338fd 100644 (file)
@@ -267,7 +267,7 @@ bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d)
 */
 
 /*!
-    \fn qdbus_cast(const QDBusArgument &arg)
+    \fn template<typename T> T qdbus_cast(const QDBusArgument &arg, T*)
     \relates QDBusArgument
     \since 4.2
 
index a6d4e9cd2585b260ab2b7ac7fae288f87011cd06..ac650d5f62f4fcc292f401937347548a24f273ac 100644 (file)
@@ -158,22 +158,14 @@ QT_END_NAMESPACE
 Q_DECLARE_METATYPE(QDBusArgument)
 QT_BEGIN_NAMESPACE
 
-template<typename T> inline T qdbus_cast(const QDBusArgument &arg
-#ifndef Q_QDOC
-, T * = nullptr
-#endif
-    )
+template<typename T> inline T qdbus_cast(const QDBusArgument &arg, T * = nullptr)
 {
     T item;
     arg >> item;
     return item;
 }
 
-template<typename T> inline T qdbus_cast(const QVariant &v
-#ifndef Q_QDOC
-, T * = nullptr
-#endif
-    )
+template<typename T> inline T qdbus_cast(const QVariant &v, T * = nullptr)
 {
     int id = v.userType();
     if (id == qMetaTypeId<QDBusArgument>())
index ca7adfaaeb90684770ac969f7ae0512bb373e935..3711981f78cdba39f3fdbcefeca12cd22e636d25 100644 (file)
@@ -122,9 +122,7 @@ public:
         SubPath = 0x1
         // Reserved = 0xff000000
     };
-#ifndef Q_QDOC
     Q_DECLARE_FLAGS(VirtualObjectRegisterOptions, VirtualObjectRegisterOption)
-#endif
 
     enum ConnectionCapability {
         UnixFileDescriptorPassing = 0x0001
index 2a31dd950a0cfa96993556f5cf45a32bc1d18859..4d0131afffff96bcba6f58423de7055f18caa519 100644 (file)
@@ -311,7 +311,7 @@ QDBusPendingCall &QDBusPendingCall::operator=(const QDBusPendingCall &other)
     \sa QDBusPendingReply::isFinished()
 */
 /*!
-    \fn bool QDBusPendingReply::isFinished() const
+    \fn template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> bool QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::isFinished() const
 
     Returns \c true if the pending call has finished processing and the
     reply has been received. If this function returns \c true, the
@@ -340,7 +340,7 @@ void QDBusPendingCall::waitForFinished()
 }
 
 /*!
-    \fn bool QDBusPendingReply::isValid() const
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> bool QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::isValid() const
 
     Returns \c true if the reply contains a normal reply message, false
     if it contains anything else.
@@ -357,7 +357,7 @@ bool QDBusPendingCall::isValid() const
 }
 
 /*!
-    \fn bool QDBusPendingReply::isError() const
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> bool QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::isError() const
 
     Returns \c true if the reply contains an error message, false if it
     contains a normal method reply.
@@ -374,7 +374,7 @@ bool QDBusPendingCall::isError() const
 }
 
 /*!
-    \fn QDBusError QDBusPendingReply::error() const
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusError QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::error() const
 
     Retrieves the error content of the reply message, if it has
     finished processing. If the reply message has not finished
@@ -395,7 +395,7 @@ QDBusError QDBusPendingCall::error() const
 }
 
 /*!
-    \fn QDBusMessage QDBusPendingReply::reply() const
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusMessage QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::reply() const
 
     Retrieves the reply message received for the asynchronous call
     that was sent, if it has finished processing. If the pending call
@@ -445,7 +445,7 @@ bool QDBusPendingCall::setReplyCallback(QObject *target, const char *member)
     \since 4.6
     Creates a QDBusPendingCall object based on the error condition
     \a error. The resulting pending call object will be in the
-    "finished" state and QDBusPendingReply::isError() will return true.
+    "finished" state and QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::isError() will return true.
 
     \sa fromCompletedCall()
 */
index ec8ba6c541b077aa16de7cf59a566b7b7964af3e..24b1d6a7ca0a275df2e6cce6690f2a9da404bd4e 100644 (file)
@@ -67,7 +67,7 @@ public:
 
     void swap(QDBusPendingCall &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
 
-#ifndef Q_QDOC
+#ifndef Q_CLANG_QDOC
     // pretend that they aren't here
     bool isFinished() const;
     void waitForFinished();
index fef6f36432971f972c0fae33a3dd884e75a39476..6aec5715635c7a270f3d90daa8e9c593868b0792 100644 (file)
@@ -94,7 +94,7 @@
 */
 
 /*!
-    \fn QDBusPendingReply::QDBusPendingReply()
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::QDBusPendingReply()
 
     Creates an empty QDBusPendingReply object. Without assigning a
     QDBusPendingCall object to this reply, QDBusPendingReply cannot do
 */
 
 /*!
-    \fn QDBusPendingReply::QDBusPendingReply(const QDBusPendingReply &other)
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::QDBusPendingReply(const QDBusPendingReply &other)
 
     Creates a copy of the \a other QDBusPendingReply object. Just like
     QDBusPendingCall and QDBusPendingCallWatcher, this QDBusPendingReply
 */
 
 /*!
-    \fn QDBusPendingReply::QDBusPendingReply(const QDBusPendingCall &call)
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::QDBusPendingReply(const QDBusPendingCall &call)
 
     Creates a QDBusPendingReply object that will take its contents from
     the \a call pending asynchronous call. This QDBusPendingReply object
 */
 
 /*!
-    \fn QDBusPendingReply::QDBusPendingReply(const QDBusMessage &message)
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::QDBusPendingReply(const QDBusMessage &message)
 
     Creates a QDBusPendingReply object that will take its contents from
     the message \a message. In this case, this object will be already
 */
 
 /*!
-    \fn QDBusPendingReply &QDBusPendingReply::operator=(const QDBusPendingReply &other)
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply &QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator=(const QDBusPendingReply &other)
 
     Makes a copy of \a other and drops the reference to the current
     pending call. If the current reference is to an unfinished pending
 */
 
 /*!
-    \fn QDBusPendingReply &QDBusPendingReply::operator=(const QDBusPendingCall &call)
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply &QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator=(const QDBusPendingCall &call)
 
     Makes this object take its contents from the \a call pending call
     and drops the reference to the current pending call. If the
 */
 
 /*!
-    \fn QDBusPendingReply &QDBusPendingReply::operator=(const QDBusMessage &message)
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply &QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator=(const QDBusMessage &message)
 
     Makes this object take its contents from the \a message message
     and drops the reference to the current pending call. If the
  */
 
 /*!
-    \fn int QDBusPendingReply::count() const
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> int QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::count() const
 
     Return the number of arguments the reply is supposed to have. This
     number matches the number of non-void template parameters in this
 */
 
 /*!
-    \fn QVariant QDBusPendingReply::argumentAt(int index) const
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QVariant QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::argumentAt(int index) const
 
     Returns the argument at position \a index in the reply's
     contents. If the reply doesn't have that many elements, this
 */
 
 /*!
-  \typedef QDBusPendingReply::T1
-  \internal
- */
-
-/*!
-    \fn T1 QDBusPendingReply::value() const
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> T1 QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::value() const
 
     Returns the first argument in this reply, cast to type \c T1 (the
     first template parameter of this class). This is equivalent to
 */
 
 /*!
-    \fn QDBusPendingReply::operator T1() const
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator T1() const
 
     Returns the first argument in this reply, cast to type \c T1 (the
     first template parameter of this class). This is equivalent to
 */
 
 /*!
-    \fn void QDBusPendingReply::waitForFinished()
+    \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> void QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::waitForFinished()
 
     Suspends the execution of the calling thread until the reply is
     received and processed. After this function returns, isFinished()
index 4d2c3a7c5a38e936a2c0eee8bb0dba0ff324e2ca..bc5cd92c84343cba41f9e3450ab3a1de985bf773 100644 (file)
@@ -108,10 +108,8 @@ namespace QDBusPendingReplyTypes {
     template <>           struct NotVoid<void> { typedef TypeIsVoid Type; };
 } // namespace QDBusPendingReplyTypes
 
-#ifndef Q_CLANG_QDOC
 template<typename T1 = void, typename T2 = void, typename T3 = void, typename T4 = void,
          typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void>
-#endif
 class QDBusPendingReply:
 #ifdef Q_CLANG_QDOC
     public QDBusPendingCall
@@ -171,7 +169,6 @@ public:
     QDBusError error() const;
     QDBusMessage reply() const;
 
-    typedef QVariant T1;
     inline T1 value() const;
     inline operator T1() const;
 #else
index ab361f1674b51ebb22d9f940bb202aade994756b..6abfaf174cc25f00044b3db8302f187e6b913f3e 100644 (file)
@@ -81,7 +81,7 @@ QT_BEGIN_NAMESPACE
 */
 
 /*!
-    \fn template<typename T> QDBusReply<T>::QDBusReply(const QDBusPendingReply &reply)
+    \fn template<typename T> QDBusReply<T>::QDBusReply(const QDBusPendingReply<T> &reply)
     Constructs a QDBusReply object from the pending reply message, \a reply.
 */
 
index 177b6c6e8925d5a3d23af5aae009efdfebfa9623..869687ac85af0d8d5c3630477300a307dd71d158 100644 (file)
@@ -82,14 +82,10 @@ public:
         other.waitForFinished();
         return *this = other.reply();
     }
-#if defined(Q_CLANG_QDOC)
-    inline QDBusReply(const QDBusPendingReply &reply) { }
-#else
     inline QDBusReply(const QDBusPendingReply<T> &reply)
     {
         *this = static_cast<QDBusPendingCall>(reply);
     }
-#endif
 
     inline QDBusReply(const QDBusError &dbusError = QDBusError())
         : m_error(dbusError), m_data(Type())
index 28341a71a88e8861af6d408b0fabb516abc6ff72..dc94897ac4ee6f416d2d2021ddaefc1725513e44 100644 (file)
@@ -331,8 +331,8 @@ namespace QDBusUtil
 
     /*!
         \internal
-        \fn bool QDBusUtil::isValidPartOfObjectPath(const QStringRef &part)
-        See QDBusUtil::isValidObjectPath
+        \fn bool isValidPartOfObjectPath(const QStringRef &part)
+        See isValidObjectPath
     */
     bool isValidPartOfObjectPath(const QStringRef &part)
     {
@@ -349,13 +349,13 @@ namespace QDBusUtil
 
     /*!
         \internal
-        \fn bool QDBusUtil::isValidPartOfObjectPath(const QString &part)
+        \fn bool isValidPartOfObjectPath(const QString &part)
 
         \overload
     */
 
     /*!
-        \fn bool QDBusUtil::isValidInterfaceName(const QString &ifaceName)
+        \fn bool isValidInterfaceName(const QString &ifaceName)
         Returns \c true if this is \a ifaceName is a valid interface name.
 
         Valid interface names must:
@@ -384,7 +384,7 @@ namespace QDBusUtil
     }
 
     /*!
-        \fn bool QDBusUtil::isValidUniqueConnectionName(const QStringRef &connName)
+        \fn bool isValidUniqueConnectionName(const QStringRef &connName)
         Returns \c true if \a connName is a valid unique connection name.
 
         Unique connection names start with a colon (":") and are followed by a list of dot-separated
@@ -414,13 +414,13 @@ namespace QDBusUtil
     }
 
     /*!
-        \fn bool QDBusUtil::isValidUniqueConnectionName(const QString &connName)
+        \fn bool isValidUniqueConnectionName(const QString &connName)
 
         \overload
     */
 
     /*!
-        \fn bool QDBusUtil::isValidBusName(const QString &busName)
+        \fn bool isValidBusName(const QString &busName)
         Returns \c true if \a busName is a valid bus name.
 
         A valid bus name is either a valid unique connection name or follows the rules:
@@ -462,7 +462,7 @@ namespace QDBusUtil
     }
 
     /*!
-        \fn bool QDBusUtil::isValidMemberName(const QStringRef &memberName)
+        \fn bool isValidMemberName(const QStringRef &memberName)
         Returns \c true if \a memberName is a valid member name. A valid member name does not exceed
         255 characters in length, is not empty, is composed only of ASCII letters, digits and
         underscores, but does not start with a digit.
@@ -482,13 +482,13 @@ namespace QDBusUtil
     }
 
     /*!
-        \fn bool QDBusUtil::isValidMemberName(const QString &memberName)
+        \fn bool isValidMemberName(const QString &memberName)
 
         \overload
     */
 
     /*!
-        \fn bool QDBusUtil::isValidErrorName(const QString &errorName)
+        \fn bool isValidErrorName(const QString &errorName)
         Returns \c true if \a errorName is a valid error name. Valid error names are valid interface
         names and vice-versa, so this function is actually an alias for isValidInterfaceName.
     */
@@ -498,7 +498,7 @@ namespace QDBusUtil
     }
 
     /*!
-        \fn bool QDBusUtil::isValidObjectPath(const QString &path)
+        \fn bool isValidObjectPath(const QString &path)
         Returns \c true if \a path is valid object path.
 
         Valid object paths follow the rules:
@@ -529,7 +529,7 @@ namespace QDBusUtil
     }
 
     /*!
-        \fn bool QDBusUtil::isValidBasicType(int type)
+        \fn bool isValidBasicType(int type)
         Returns \c true if \a c is a valid, basic D-Bus type.
      */
     bool isValidBasicType(int c)
@@ -538,7 +538,7 @@ namespace QDBusUtil
     }
 
     /*!
-        \fn bool QDBusUtil::isValidFixedType(int type)
+        \fn bool isValidFixedType(int type)
         Returns \c true if \a c is a valid, fixed D-Bus type.
      */
     bool isValidFixedType(int c)
@@ -548,7 +548,7 @@ namespace QDBusUtil
 
 
     /*!
-        \fn bool QDBusUtil::isValidSignature(const QString &signature)
+        \fn bool isValidSignature(const QString &signature)
         Returns \c true if \a signature is a valid D-Bus type signature for one or more types.
         This function returns \c true if it can all of \a signature into valid, individual types and no
         characters remain in \a signature.
@@ -569,7 +569,7 @@ namespace QDBusUtil
     }
 
     /*!
-        \fn bool QDBusUtil::isValidSingleSignature(const QString &signature)
+        \fn bool isValidSingleSignature(const QString &signature)
         Returns \c true if \a signature is a valid D-Bus type signature for exactly one full type. This
         function tries to convert the type signature into a D-Bus type and, if it succeeds and no
         characters remain in the signature, it returns \c true.
index 857b9c5ef517927099923a896ab671a0bfe72409..2220efd5cb823dddb2eec71d6c059a02ffc49e68 100644 (file)
@@ -967,8 +967,10 @@ protected:
     int m_lastColumn;
 };
 
+#ifndef Q_CLANG_QDOC
 #define QAccessibleInterface_iid "org.qt-project.Qt.QAccessibleInterface"
 Q_DECLARE_INTERFACE(QAccessibleInterface, QAccessibleInterface_iid)
+#endif
 
 Q_GUI_EXPORT const char *qAccessibleRoleString(QAccessible::Role role);
 Q_GUI_EXPORT const char *qAccessibleEventString(QAccessible::Event event);
index 00287b0665ec01d4acbf8193ece74f9576cd7284..4554291bbd91bda08df085bb914506a4481cdede 100644 (file)
@@ -228,26 +228,8 @@ struct QOpenGLFunctionsPrivate;
 #undef glTexLevelParameteriv
 
 #if defined(Q_CLANG_QDOC)
-#undef GLint
-typedef int GLint;
-#undef GLsizei
-typedef int GLsizei;
-#undef GLuint
-typedef unsigned int GLuint;
-#undef GLubyte
-typedef unsigned int GLubyte;
-#undef GLenum
-typedef unsigned int GLenum;
 #undef GLbitfield
 typedef unsigned int GLbitfield;
-#undef GLfloat
-typedef float GLfloat;
-#undef GLclampf
-typedef float GLclampf;
-#undef GLboolean
-typedef bool GLboolean;
-#undef GLvoid
-typedef void GLvoid;
 #undef GLchar
 typedef char GLchar;
 #endif
index 84eb8d69565cb87824c057d519afc8298096e95d..0add9150c8d09843df8adac38c88d38795ee9335 100644 (file)
 #include <QtGui/qvector4d.h>
 #include <QtGui/qmatrix4x4.h>
 
-#if defined(Q_CLANG_QDOC)
-#undef GLint
-typedef int GLint;
-#undef GLfloat
-typedef double GLfloat;
-#endif
-
 QT_BEGIN_NAMESPACE
 
 
index 8fea27f772c04a5424e4026ce8d28ff9f7073476..33714014200fe1b498d9b9dcc8617541ab5a1b71 100644 (file)
@@ -143,7 +143,9 @@ public:
     virtual void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) = 0;
 };
 
+#ifndef Q_CLANG_QDOC
 Q_DECLARE_INTERFACE(QTextObjectInterface, "org.qt-project.Qt.QTextObjectInterface")
+#endif
 
 QT_END_NAMESPACE
 
index 7c82637564c85b44d07cfa59184b8930e89f425b..f4348b690e0d1debe9afaec49a2a5784c8341243 100644 (file)
@@ -330,25 +330,6 @@ int QHostInfo::lookupHost(const QString &name, QObject *receiver,
     \since 5.10
 */
 
-/*!
-    \fn template<typename PointerToMemberFunction> int QHostInfo::lookupHost(const QString &name, const QObject *receiver, PointerToMemberFunction function)
-
-    \since 5.9
-
-    \overload
-
-    Looks up the IP address(es) associated with host name \a name, and
-    returns an ID for the lookup. When the result of the lookup is
-    ready, the slot or signal \a function in \a receiver is called with
-    a QHostInfo argument. The QHostInfo object can then be inspected
-    to get the results of the lookup.
-
-    \note There is no guarantee on the order the signals will be emitted
-    if you start multiple requests with lookupHost().
-
-    \sa abortHostLookup(), addresses(), error(), fromName()
-*/
-
 /*!
     \fn template<typename Functor> int QHostInfo::lookupHost(const QString &name, Functor functor)
 
@@ -389,6 +370,16 @@ int QHostInfo::lookupHost(const QString &name, QObject *receiver,
     thread of \a context. The context's thread must have a running Qt
     event loop.
 
+    Here is an alternative signature for the function:
+    \code
+    lookupHost(const QString &name, const QObject *receiver, PointerToMemberFunction function)
+    \endcode
+
+    In this case, when the result of the lookup is ready, the slot or
+    signal \c{function} in \c{receiver} is called with a QHostInfo
+    argument. The QHostInfo object can then be inspected to get the
+    results of the lookup.
+
     \note There is no guarantee on the order the signals will be emitted
     if you start multiple requests with lookupHost().
 
index 75917a02a30461cc2f65d1e39db011fec12346ac..49871ad470386c72b83cf92e8177cf9947a43d5c 100644 (file)
@@ -91,13 +91,10 @@ public:
     static QString localDomainName();
 
 #ifdef Q_CLANG_QDOC
-    template<typename PointerToMemberFunction>
-    static int QHostInfo::lookupHost(const QString &name, const QObject *receiver,
-                              PointerToMemberFunction function);
     template<typename Functor>
-    static int QHostInfo::lookupHost(const QString &name, Functor functor);
+    static int lookupHost(const QString &name, Functor functor);
     template<typename Functor>
-    static int QHostInfo::lookupHost(const QString &name, const QObject *context, Functor functor);
+    static int lookupHost(const QString &name, const QObject *context, Functor functor);
 #else
     // lookupHost to a QObject slot
     template <typename Func>
index a1ba0485e041faeacb9d38d62bb1852c4fc86947..f5accbeb3c03f1b69a4ad69ea48f6cc7a009c366 100644 (file)
 
 #include <QtGui/QSurfaceFormat>
 
-#if defined(Q_CLANG_QDOC)
-#undef GLint
-typedef int GLint;
-#undef GLuint
-typedef unsigned int GLuint;
-#undef GLenum
-typedef unsigned int GLenum;
-#undef GLclampf
-typedef float GLclampf;
-#undef GLsizei
-typedef int GLsizei;
-#undef GLboolean
-typedef bool GLboolean;
-#endif
-
-
 QT_BEGIN_NAMESPACE
 
 
index dfdef44b54901bb5a38ee560585e3fb5660921c4..3ce88197d27a67a2dfd97e9987dc7a95b4acd50d 100644 (file)
 #include <QtGui/qvector4d.h>
 #include <QtGui/qmatrix4x4.h>
 
-#if defined(Q_CLANG_QDOC)
-#undef GLfloat
-typedef double GLfloat;
-#undef GLint
-typedef int GLint;
-#undef GLuint
-typedef unsigned int GLuint;
-#undef GLenum
-typedef unsigned int GLenum;
-#endif
-
 QT_BEGIN_NAMESPACE
 
 
index 4b993a9e658a59927b082ab3f279f88582490039..0a2edb1eee13849b218201f1e9f61d50640d7ebf 100644 (file)
@@ -284,9 +284,9 @@ public:
 Q_SIGNALS:
     void buttonClicked(QAbstractButton *button);
 
-#ifdef Q_QDOC
+#ifdef Q_CLANG_QDOC
 public Q_SLOTS:
-    int exec();
+    int exec() override;
 #endif
 
 protected:
index c228e765d84257c2f8b493effba8fbdb7912d657..729176530d335a40d8ffb19fe301ef8385edf66d 100644 (file)
@@ -487,7 +487,9 @@ private:
 };
 
 Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
+#ifndef Q_CLANG_QDOC
 Q_DECLARE_INTERFACE(QGraphicsItem, "org.qt-project.Qt.QGraphicsItem")
+#endif
 
 inline void QGraphicsItem::setPos(qreal ax, qreal ay)
 { setPos(QPointF(ax, ay)); }
index 28b335ceaad0d1a66550a68ae2d69742ab29313c..efcafa5e6aa329a2f60cff5393aee37f9b0b371f 100644 (file)
@@ -83,7 +83,9 @@ private:
     friend class QGraphicsWidget;
 };
 
+#ifndef Q_CLANG_QDOC
 Q_DECLARE_INTERFACE(QGraphicsLayout, "org.qt-project.Qt.QGraphicsLayout")
+#endif
 
 QT_END_NAMESPACE
 
index 44f430034b47e7e089df8f12b1cba5dbb1cf5233..86a0a87361b973fc9f2976ea4725188a7e66c7c4 100644 (file)
@@ -116,7 +116,9 @@ private:
     friend class QGraphicsLayout;
 };
 
+#ifndef Q_CLANG_QDOC
 Q_DECLARE_INTERFACE(QGraphicsLayoutItem, "org.qt-project.Qt.QGraphicsLayoutItem")
+#endif
 
 inline void QGraphicsLayoutItem::setMinimumSize(qreal aw, qreal ah)
 { setMinimumSize(QSizeF(aw, ah)); }
index 8dff2ffc347194601413e873b07faeecff6d6ac0..bc144a8ea16ef4f285117a0a435df40200b39464 100644 (file)
@@ -1782,21 +1782,6 @@ QAction *QMenu::addAction(const QString &text, const QObject *receiver, const ch
     return action;
 }
 
-/*!\fn template<typename PointerToMemberFunction> QAction *QMenu::addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0)
-
-    \since 5.6
-
-    \overload
-
-    This convenience function creates a new action with the text \a
-    text and an optional shortcut \a shortcut. The action's
-    \l{QAction::triggered()}{triggered()} signal is connected to the
-    \a method of the \a receiver. The function adds the newly created
-    action to the menu's list of actions and returns it.
-
-    QMenu takes ownership of the returned QAction.
-*/
-
 /*!\fn template<typename Functor> QAction *QMenu::addAction(const QString &text, Functor functor, const QKeySequence &shortcut = 0)
 
     \since 5.6
@@ -1821,25 +1806,11 @@ QAction *QMenu::addAction(const QString &text, const QObject *receiver, const ch
     This convenience function creates a new action with the text \a
     text and an optional shortcut \a shortcut. The action's
     \l{QAction::triggered()}{triggered()} signal is connected to the
-    \a functor. The function adds the newly created
-    action to the menu's list of actions and returns it.
+    \a functor. The functor can be a pointer to a member function of
+    the \a context object. The newly created action is added to the
+    menu's list of actions and a pointer to it is returned.
 
-    If \a context is destroyed, the functor will not be called.
-
-    QMenu takes ownership of the returned QAction.
-*/
-
-/*!\fn template<typename PointerToMemberFunction> QAction *QMenu::addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0)
-
-    \since 5.6
-
-    \overload
-
-    This convenience function creates a new action with an \a icon
-    and some \a text and an optional shortcut \a shortcut. The action's
-    \l{QAction::triggered()}{triggered()} signal is connected to the
-    \a method of the \a receiver. The function adds the newly created
-    action to the menu's list of actions and returns it.
+    If the \a context object is destroyed, the functor will not be called.
 
     QMenu takes ownership of the returned QAction.
 */
@@ -1868,8 +1839,9 @@ QAction *QMenu::addAction(const QString &text, const QObject *receiver, const ch
     This convenience function creates a new action with an \a icon
     and some \a text and an optional shortcut \a shortcut. The action's
     \l{QAction::triggered()}{triggered()} signal is connected to the
-    \a functor. The function adds the newly created
-    action to the menu's list of actions and returns it.
+    \a functor. The \a functor can be a pointer to a member function
+    of the \a context object. The newly created action is added to the
+    menu's list of actions and a pointer to it is returned.
 
     If \a context is destroyed, the functor will not be called.
 
index 628f818b5eefe61cc401beb8ae6fb34580bba7d3..84ab9e027a97112a7cf466da9fb2ca5465724f42 100644 (file)
@@ -82,14 +82,10 @@ public:
     QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
 
 #ifdef Q_CLANG_QDOC
-    template<typename PointerToMemberFunction>
-    QAction *addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0);
     template<typename Functor>
     QAction *addAction(const QString &text, Functor functor, const QKeySequence &shortcut = 0);
     template<typename Functor>
     QAction *addAction(const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut = 0);
-    template<typename PointerToMemberFunction>
-    QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0);
     template<typename Functor>
     QAction *addAction(const QIcon &icon, const QString &text, Functor functor, const QKeySequence &shortcut = 0);
     template<typename Functor>
index 4af71c126e85c679be468552eea83d249ec4e5a3..1cd30e4d0d4b777407f0a56dbeaf94770576356f 100644 (file)
@@ -799,18 +799,6 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text,
     return action;
 }
 
-/*!\fn template<typename PointerToMemberFunction> QAction *QToolBar::addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method)
-
-    \since 5.6
-
-    \overload
-
-    Creates a new action with the given \a text. This action is added to
-    the end of the toolbar. The action's
-    \l{QAction::triggered()}{triggered()} signal is connected to the
-    \a method of the \a receiver.
-*/
-
 /*!\fn template<typename Functor> QAction *QToolBar::addAction(const QString &text, Functor functor)
 
     \since 5.6
@@ -829,24 +817,13 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text,
 
     \overload
 
-    Creates a new action with the given \a text. This action is added to
-    the end of the toolbar. The action's
+    Creates a new action with the given \a text. This action is added
+    to the end of the toolbar. The action's
     \l{QAction::triggered()}{triggered()} signal is connected to the
-    \a functor.
-
-    If \a context is destroyed, the functor will not be called.
-*/
-
-/*!\fn template<typename PointerToMemberFunction> QAction *QToolBar::addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method)
-
-    \since 5.6
+    \a functor. The \a functor can be a pointer to a member function
+    in the \a context object.
 
-    \overload
-
-    Creates a new action with the given \a icon and \a text. This
-    action is added to the end of the toolbar. The action's
-    \l{QAction::triggered()}{triggered()} signal is connected to the
-    \a method of the \a receiver.
+    If the \a context object is destroyed, the \a functor will not be called.
 */
 
 /*!\fn template<typename Functor> QAction *QToolBar::addAction(const QIcon &icon, const QString &text, Functor functor)
@@ -870,9 +847,10 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text,
     Creates a new action with the given \a icon and \a text. This
     action is added to the end of the toolbar. The action's
     \l{QAction::triggered()}{triggered()} signal is connected to the
-    \a functor.
+    \a functor. The \a functor can be a pointer to a member function
+    of the \a context object.
 
-    If \a context is destroyed, the functor will not be called.
+    If the \a context object is destroyed, the \a functor will not be called.
 */
 
 /*!
index 4ae83190d1230270e5565682c7ab50d1c90c2593..0c434e8d1d14f255733be79ef571b7973414d37d 100644 (file)
@@ -99,15 +99,11 @@ public:
     QAction *addAction(const QString &text, const QObject *receiver, const char* member);
     QAction *addAction(const QIcon &icon, const QString &text,
                        const QObject *receiver, const char* member);
-#ifdef Q_QDOC
-    template<typename PointerToMemberFunction>
-    QAction *addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method);
+#ifdef Q_CLANG_QDOC
     template<typename Functor>
     QAction *addAction(const QString &text, Functor functor);
     template<typename Functor>
     QAction *addAction(const QString &text, const QObject *context, Functor functor);
-    template<typename PointerToMemberFunction>
-    QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method);
     template<typename Functor>
     QAction *addAction(const QIcon &icon, const QString &text, Functor functor);
     template<typename Functor>
@@ -149,7 +145,7 @@ public:
         connect(result, &QAction::triggered, slot);
         return result;
     }
-#endif // !Q_QDOC
+#endif // !Q_CLANG_QDOC
 
     QAction *addSeparator();
     QAction *insertSeparator(QAction *before);